home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dirut
/
secret3.zip
/
MDSECRE2.ASM
< prev
next >
Wrap
Assembly Source File
|
1992-10-17
|
2KB
|
68 lines
TITLE MDSECRET 5-9-85 [10-17-92]
;v1.1 Toad Hall Rewrite of a disassembly of MDSECRET.COM
; Severe tightening: a virtual rewrite.
; Released to the public domain.
;
;v1.2 Added cmdline processing as well as prompted entry
; in common GETPARM.INC.
;
; David Kirschbaum
; Toad Hall
LF EQU 0AH
CR EQU 0DH
CSEG SEGMENT
ASSUME DS:CSEG, SS:CSEG ,CS:CSEG ,ES:CSEG
ORG 100H
MDSecret PROC NEAR
jmp Start ;v1.2
logo label byte
db 'MDSECRET: Creates "secret" directory.',CR,LF
db 'Usage: MDSECRET [dirnam]',CR,LF
db 'Where [dirname] is a legal directory name (up to 7 chars max).',CR,LF
db 'v1.2 Public domain rewrite of an old 1985 standard.',CR,LF
db 'David Kirschbaum, Toad Hall',CR,LF,'$'
Start: call GetParm ;get directory name v1.2
jc MsgTerm ;no or illegal input, fail v1.2
;(msg in DX, AL=-1)
;DS:DX -> directory name start, CX = name length.
MOV AH,39H ;create subdirectory
INT 21H ;DS:DX -> AsciiZ name
JB Failed140 ;create failed, error in AL
;Directory is now created.
;Change its attribute to system
MOV CX,2 ;system attribute
MOV AX,4301H ;set file attribute
int 21H ;DS:DX still -> dirname v1.1
jmp short Term ;terminate, ERRORLEVEL 0 v1.1
Failed140:
add error1F9,al ;error msg digit v1.1
MOV DX,OFFSET msg1F0 ;'Error # x'
;v1.1 Display message in DX, terminate with ERRORLEVEL in AL
MsgTerm:
push ax ;save errorlevel v1.1
MOV AH,9 ;display msg in DX
INT 21H
pop ax ;restore errorlevel v1.1
Term: mov ah,4CH ;terminate, ERRORLEVEL in AL v1.1
int 21H ;v1.1
MDSecret ENDP
INCLUDE GETPARM.INC ;v1.2
CSEG ENDS
END MDSecret